const mongoose = require('../db')

const BlogSchema = new mongoose.Schema({
  title: { type: String, required: true },
  author: { type: String, required: true, default: 'Xu Hua' },
  sort: { type: Number, required: true },
  content: { type: String, required: true },
  state: { type: Number, required: true },
  type: { type: Number, required: true },
  createTime: { type: Date},
  updateTime: { type: Date},
})

module.exports = mongoose.model('blog', BlogSchema, 'blog')
